/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "corsi")
@NamedQueries({
    @NamedQuery(name = "Corsi.findAll", query = "SELECT c FROM Corsi c"),
    @NamedQuery(name = "Corsi.findById", query = "SELECT c FROM Corsi c WHERE c.id = :id"),
    @NamedQuery(name = "Corsi.findByNome", query = "SELECT c FROM Corsi c WHERE c.nome = :nome"),
    @NamedQuery(name = "Corsi.findByDescr", query = "SELECT c FROM Corsi c WHERE c.descr = :descr"),
    @NamedQuery(name = "Corsi.findBySedeid", query = "SELECT c FROM Corsi c WHERE c.sedeid = :sedeid")})
public class Corsi implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "nome")
    private String nome;
    @Column(name = "descr")
    private String descr;
    @Column(name = "sedeid")
    private Integer sedeid;

    public Corsi() {
    }

    public Corsi(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getDescr() {
        return descr;
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public Integer getSedeid() {
        return sedeid;
    }

    public void setSedeid(Integer sedeid) {
        this.sedeid = sedeid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Corsi)) {
            return false;
        }
        Corsi other = (Corsi) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "jpa.Corsi[id=" + id + "]";
    }

}
